package lgs.hm;

public class TestThis {
	
	int i = 0;
	public TestThis(int i) {
		this.i = i;
	}
	TestThis change() {
		i++;
		return this;  //返回的值就是TestThis本身
	}
	void print() {
		System.out.println("i="+i);
	}
	
	public static void main(String[] args) {
		TestThis tt = new TestThis(100);
		tt.change().change().print();
	}

}
